Skip to content

fix(frontend): stop mount config from showing cache limits it never sends (#811) - #818

Merged
javi11 merged 1 commit into
mainfrom
session/altmount-issue-811-1ea933
Aug 10, 2026
Merged

fix(frontend): stop mount config from showing cache limits it never sends (#811)#818
javi11 merged 1 commit into
mainfrom
session/altmount-issue-811-1ea933

Conversation

@javi11

@javi11 javi11 commented Aug 10, 2026

Copy link
Copy Markdown
Owner

Summary

Follow-up to triage of #811 ("Internal Rclone mount not correctly purging used storage"). Two UI-side defects that make the rclone VFS cache limits look configured when they are not.

1. The form fabricated limits that were never sent to rclone.
buildRCloneMountFormData used config.rclone.vfs_cache_max_size || "50G" (and the same for vfs_cache_max_age / vfs_cache_poll_interval). If the stored value was empty, the UI displayed 50G while the backend's if != "" guard in pkg/rclonecli/client.go sent no CacheMaxSize at all — and rclone's default is no cap, so the cache directory grows until the disk fills. That is exactly the reported symptom. Now the stored value is shown verbatim, the defaults remain as placeholder hints, and an inline warning appears when cache mode is on with an empty max size.

2. No indication that a remount is required.
vfsOpt is only built in performMount, and no OnConfigChange handler remounts, so edits to the cache limits do nothing to a running mount until stop/start or an app restart. The section now says so.

Not included

Verified during triage and left for separate changes:

  • The option plumbing itself is correct — tested the exact mount/mount payload against rclone 1.72.1, and vfs/stats reported CacheMaxSize: 53687091200, CacheMaxAge: 1814400000000000, CachePollInterval: 60000000000. When a mount is created, the limits do reach rclone.
  • Auto-remount on config change is not implemented here — an automatic remount drops in-flight streams and deserves its own discussion.
  • Several options the UI exposes are never passed to the mount: vfs_cache_min_free_space, vfs_disk_space_total, dir_cache_time, async_read, use_mmap, vfs_fast_fingerprint, vfs_read_chunk_streams, read_only, umask, transfers, timeout, syslog. vfs_cache_min_free_space is the notable one since it reads as a cache limit.

Test plan

  • bun run check (biome) clean
  • bun run build (tsc -b + vite) green
  • Config with vfs_cache_max_size: "" → field renders empty with the warning, not a phantom 50G
  • Config with vfs_cache_max_size: 50G → field renders 50G, no warning
  • Saving an untouched form does not rewrite the stored cache limits

Refs #811

…ends (#811)

The rclone mount form substituted "50G"/"504h"/"1m" whenever the stored
VFS cache limit was empty, so a config with no limit looked like a
configured 50G cap while AltMount sent no CacheMaxSize to rclone at all
(rclone then caches without bound). Show the stored values verbatim and
keep the defaults as placeholders, plus warn inline when caching is on
with no size limit.

Also note in the section that mount options are only applied when the
mount is created, so saving alone does not affect a running mount.
@javi11
javi11 merged commit a1f3b69 into main Aug 10, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant